﻿<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="RSSList.aspx.vb" Inherits="TechJunkieProj.RSSList" ContentType= "text/xml"%>
<%@ Import Namespace= "System.Data"  %>

<asp:SqlDataSource ID="SqlDataSource1" runat="server" 
        ConnectionString="<%$ ConnectionStrings:ConnectionStringList %>" 
        ProviderName="<%$ ConnectionStrings:ConnectionStringList.ProviderName %>" 
        SelectCommand=" SELECT TOP 5 * FROM SmartPhoneList ORDER BY DateUpdated DESC">
    </asp:SqlDataSource>

    <asp:Repeater ID="Repeater1" runat="server" DataSourceID="SqlDataSource1">
    
    <HeaderTemplate>
<rss version="2.0">
<channel>
<title>List of Smart Phone Discussion</title>
<description>***Smart Phones discussion***</description>
</HeaderTemplate>
<ItemTemplate>
<item>
<title><strong>Discussion Title: </strong> <%# FormatForXML(DataBinder.Eval(Container.DataItem, "Title"))%></title>
            <br />
            <description>
                        <author><strong>Author: </strong><%# FormatForXML(DataBinder.Eval(Container.DataItem, "Author"))%></author>
            <br />
            
                        <DateUpdated><strong>Date Published: </strong><%# FormatForXML(String.Format("{0:R}", DataBinder.Eval(Container.DataItem, "DateUpdated")))%></DateUpdated>
             <br />
            </description>
            
             <link> Details.aspx?ID=<%# FormatForXML(DataBinder.Eval(Container.DataItem, "ID"))%></link>
            <br />
<hr />
</item>

</ItemTemplate>
<FooterTemplate>
</channel>
</rss>
</FooterTemplate>
</asp:Repeater>
    
  